package jdbc;

import java.sql.Connection;
import java.sql.DriverManager;

import java.sql.PreparedStatement;

public class TestJDBC {

	public static void main(String[] args) throws Exception{
		//JDBC Interfaces
		String sql="insert into users (uname,age) values(?,?)";
		String url="jdbc:mysql://60.205.223.43:3306/test";
		String usr="root";
		String psd="123";
		Connection con=null;
		con=DriverManager.getConnection(url, usr,psd);
		PreparedStatement pst=con.prepareStatement(sql);
		pst.setString(1, "john");
		pst.setInt(2, 100);
		
		pst.executeUpdate();
		
		pst.close();
		con.close();
	}

}
